<?php /*a:1:{s:71:"E:\soft\phpstudy_pro\WWW\dw\application\admin\view\cates\cate_list.html";i:1588812837;}*/ ?>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="Bookmark" href="/favicon.ico" >
<link rel="Shortcut Icon" href="/favicon.ico" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5shiv.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="/static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="/static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="/static/lib/Hui-iconfont/1.0.8/iconfont.css" />
<link rel="stylesheet" type="text/css" href="/static/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="/static/h-ui.admin/css/style.css" />
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>分类列表</title>
<style type="text/css">
    .ygmargin{margin-top: 10px;color: #999;}
    .tmore a:first-child{background-color:#ffc000;color:#fff;padding:5px 12px;}
    .tmore a:first-child:hover{background-color:#eea236;}
    .tmore a:nth-child(2) i{padding:7px 15px;}
    .tmore a:last-child{background-color:#429842;color:#fff;padding:5px 12px;}
    .tmore a:last-child:hover{background-color:#337ab7;}
    .fa-angle-down{display:none;}
    .tcate{border:1px solid #eee;border-radius:3px;height:36px;margin-bottom:5px;}
    .tcate div:first-child{float:left;height:36px;line-height:36px;}
    .tcate img{float:left;width:40px;height:30px;border:1px solid #ccc;margin:2px;}
    .tcate h6:hover{font-weight:700;cursor:pointer;}
    .tcate div:first-child div{float:left;margin-top:-2px;}
    .tcate div:first-child div span:first-child{font-size:20px;padding:0px 10px;margin:0px 5px;cursor:pointer;}
    .tcate div:first-child div span:last-child{font-size:20px;padding:0px 10px;margin:0px 5px;cursor:pointer;}
    .tcate div:first-child h6{float:left;}
    .tcate div:last-child{float:right;height:36px;line-height:36px;margin-top:-2px;}
    .minus{}
    .plus{display:none;}
    .main{margin:20px;}
</style>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 商城 <span class="c-gray en">&gt;</span> 分类列表 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container main">
			<div class=" wyheader tmore">
                <!-- <a href="javascript:;" onclick="catelevel('设置分类层级','<?php echo url('catelevel'); ?>','800','500')" class="storespan btn btn-xs">设置分类层级</a> -->
                <?php if($catelevel>1): ?>
                <a class="storespan btn btn-xs"><i class="fa fa-angle-up">折叠所有</i><i class="fa fa-angle-down">展开所有</i></a>
                <?php endif; if($catelevel>=1): ?>
                <a  href="javascript:;" onclick="cate_add('添加商品一级分类','<?php echo url('cate_add'); ?>','800','500')" class="storespan btn btn-xs">添加分类</a>
                <?php endif; ?>
            </div>
            <div class="panel-body">
            	<?php echo html_entity_decode($cates); ?>
            </div>
</div>
<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="/static/lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="/static/lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="/static/h-ui/js/H-ui.min.js"></script> 
<script type="text/javascript" src="/static/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="/static/lib/My97DatePicker/4.8/WdatePicker.js"></script> 
<script type="text/javascript" src="/static/lib/datatables/1.10.0/jquery.dataTables.min.js"></script> 
<script type="text/javascript" src="/static/lib/laypage/1.2/laypage.js"></script>
<script type="text/javascript">
/*分类-层级*/
function catelevel(title,url,w,h){
	layer_show(title,url,w,h);
}
/*分类-增加*/
function cate_add(title,url,w,h){
	layer_show(title,url,w,h);
}
/*分类-删除*/
function cate_del(obj,id){
	layer.confirm('确认要删除吗？',function(index){
		$.ajax({
			type: 'POST',
			url: 'cate_del',
			data:{id:id},
			success: function(data){
				layer.msg('已删除!',{icon:1,time:3000});
        		setTimeout("location.reload()",1000);
			},
			error:function(data) {
				layer.msg('出错!',{icon:2,time:3000});
        		setTimeout("location.reload()",1000);
			},
		});		
	});
}
/*分类-编辑*/
function cate_edit(title,url,id,w,h){
	layer_show(title,url,w,h);
}
/*禁用/启用*/
function state_on(id){
	console.log($(this).children("input"))
	$.post('<?php echo url("state_on"); ?>',
    {id:id},
    function(data){
    	console.log(data)
        if(data.code==201){
        	layer.msg(data.msg,{icon:1,time:3000});
        	setTimeout("location.reload()",1000);
        }else if(data.code==202){
        	layer.msg(data.msg,{icon:1,time:3000});
        	setTimeout("location.reload()",1000);
        }else{
        	layer.msg(data.msg,{icon:2,time:3000});
        }
    });
    return false;
}

$(function(){
    $(".minus").click(function(){
        $(this).css("display","none");
        $(this).next().css("display","block");
        $(this).parents(".tcate").siblings().children("li").hide();
    });
    $(".plus").click(function(){
        $(this).css("display","none");
        $(this).prev().css("display","block");
        $(".minuslast").css("display","none");
        $(this).parents(".tcate").siblings().children("li").show();
    });
    $(".fa-angle-up").click(function(){
        $(this).css("display","none");
        $(this).next().css("display","unset");

        $(".minus").css("display","none");
        $(".minus").next().css("display","block");
        $(".minus").parents(".tcate").siblings().children("li").hide();
    });
    $(".fa-angle-down").click(function(){
        $(this).css("display","none");
        $(this).prev().css("display","unset");

        $(".plus").css("display","none");
        $(".plus").prev().css("display","block");
        $(".minuslast").css("display","none");
        $(".plus").parents(".tcate").siblings().children("li").show();
    });
})
</script>
</body>
</html>